<!-- struts2不推荐使用JSTL，如果要使用el表达式，请注意加入isELIgnored="false" -->  
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>  
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
    <html>  
    <head>  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
    <title>DWR测试</title>  
    <script type='text/javascript' src='<%=basePath%>dwr/engine.js'></script>  
    <script type='text/javascript' src='<%=basePath%>dwr/util.js'></script>  
    <script type='text/javascript' src='<%=basePath%>dwr/interface/TestDwrService.js'></script>  
    </head>  
    <body>  
      
    <a href="javascript:testDwrList();">测试dwr-list</a>  
    <a href="javascript:testDwrMap();">测试dwr-map</a>  
      
    </body>  
    <script type="text/javascript">  
        function testDwrList(){  
            TestDwrService.test(function(data){  
                var detail = '公告-list：';
                for(var i=0;i<data.length;i++){  
                	detail = detail + data[i].name+"-花费:"+data[i].total+"元\r\n";        
                }       
                alert(detail);  
            });       
        }  
        function testDwrMap(){  
            TestDwrService.testMap(function(data){  
                var detail = '公告-map：';
                for(var key in data){
                	detail = detail+ key+": " + data[key].name+"-花费:"+data[key].total+"元\r\n";
                }  
                alert(detail);  
            });       
        }  
    </script>  
    </html>  